From ac4da770e10fa293a7c99bb3c4bcb8490f431e7f Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 26 Nov 2013 15:08:08 +0000 Subject: [PATCH] gtkprintunixdialog: Fix a potential g_object_unref(NULL) call MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The code above checks whether (printer == NULL), so we’d better do so here as well. Found by scan-build. https://bugzilla.gnome.org/show_bug.cgi?id=712760 --- gtk/gtkprintunixdialog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 85fca0d332..cca1dc5409 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -961,7 +961,7 @@ void set_cell_sensitivity_func (GtkTreeViewColumn *tree_column, else g_object_set (cell, "sensitive", TRUE, NULL); - g_object_unref (printer); + g_clear_object (&printer); } static void -- 2.30.2